package com.wnxy.sk.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.wnxy.sk.product.entity.ProductCover;
import com.wnxy.sk.product.mapper.ProductCoverMapper;
import com.wnxy.sk.product.service.IProductCoverService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 商品封面 服务实现类
 * </p>
 *
 * @author Jet
 * @since 2022-10-11
 */
@Service
public class ProductCoverServiceImpl extends ServiceImpl<ProductCoverMapper, ProductCover> implements IProductCoverService {

    @Override
    public List<ProductCover> findByProductId(Integer productId) {
        return baseMapper.selectList(
                Wrappers.lambdaQuery(ProductCover.class)
                        .eq(ProductCover::getProductId,productId));
    }
}
